
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <meta name="csrf-param" content="_csrf">
    <meta name="csrf-token" content="">
    <title>报名表</title>
    <!--iOS中隐藏Safari浏览器的UI:Start-->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <!--iOS中隐藏Safari浏览器的UI:End-->
    <!--iOS Safari对页面数字禁用拨号功能:Start-->
    <meta name="format-detection" content="telephone=no">
    <meta name="format-detection" content="email=no">
    <!--iOS Safari对页面数字禁用拨号功能:End-->
    <link rel="stylesheet" href="/css/mobile.css">
    <link rel="stylesheet" href="/js/layui/css/layui.css">
    <script src="/js/jquery.min.js"></script>
    <script src="/js/rem.js"></script>
    <script src="/js/TouchSlide.1.1.js"></script>
    <script src="/js/layui/layui.js"></script>
    <script>
        layui.use(['layer'], function(){
            var layer = layui.layer
        });
    </script>
</head>
<body class="body_main" >
<div id="index_banner">
    <div class="ban_tab">
        <ul>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </div>
    <div class="ban_imp">
        <ul>
            <li><img src="/img/bannar1.jpg"  /></li>
            <li><img src="/img/bannar2.jpg"   /></li>
            <li><img src="/img/bannar3.jpg"   /></li>
            <li><img src="/img/bannar4.jpg"/></li>
            <li><img src="/img/bannar5.jpg" /></li>
            <li><img src="/img/bannar6.jpg"  /></li>
            <li><img src="/img/bannar7.jpg"   /></li>
            <li><img src="/img/bannar8.jpg"   /></li>
            <li><img src="/img/bannar9.jpg"/></li>
            <li><img src="/img/bannar10.jpg" /></li>
            <li><img src="/img/bannar11.jpg"  /></li>
            <li><img src="/img/bannar12.jpg"   /></li>
            <li><img src="/img/bannar13.jpg"   /></li>

        </ul>
    </div>
</div>
<script type="text/javascript">
    TouchSlide({
        slideCell:"#index_banner",
        titCell:".ban_tab ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
        mainCell:".ban_imp ul",
        effect:"leftLoop",
        autoPage:true,//自动分页
        autoPlay:true, //自动播放
        interTime:5000
    });
</script>

<!--    <div class="header_div">
       <div class="header_logo">Logo：数字乡村</div>
       <div class="header_title">
           <h1>神农杯<br />燕赵文化银龄展演</h1>
           <h2>火热报名</h2>

       </div>
   </div> -->
<!--header_div end-->
<div class="sign_up">
    <div class="sign_up_biao">
        <h1>报名表</h1>
        <div class="sign_up_link">
            <a href="/">
                <span class="sign_up_detail">详情</span>
                <img src="/img/sign_img.jpg" />
                <h2>神农杯—燕赵文化银龄展演</h2>
            </a>
        </div>
    </div>
    <!--sign_up_biao-->
    <div class="sign_up_form">

        <div class="sign_up_item" id="sign_up_tab">
            <label><span>*</span>参赛形式</label>
            <em class="sign_up_tab sign_up_tab_on" rel="1" val="1" tag_id="type">个人</em>
            <em  class="sign_up_tab"  rel="2" val="2" tag_id="type">团体</em>
        </div>
        <input type="hidden" id="type" value="1" />
        <form id="form_1">
            <div class="sign_up_item">
                <label><span>*</span>参赛场次</label>
                <div class="sign_up_select" val="compete_id" text="compete_person" id="compete_person" >请选择参赛场次</div>
            </div>
            <input type="hidden" name="" value="" class="required" id="compete_id" tip="参数场次">
            <div class="sign_up_item">
                <label><span>*</span>节目名称</label>
                <input type="text" name="" class="sign_up_input required" placeholder="请填写" id="person_subject" tip="节目名称"/>
            </div>
            <div class="sign_up_item">
                <label><span>*</span>本人姓名</label>
                <input type="text" name="" class="sign_up_input required" placeholder="请填写" id="person_name" tip="本人姓名"/>
            </div>
            <div class="sign_up_item">
                <label class="sign_up_id"><span>&nbsp;</span>身份证号码（50周以上）</label>
                <input type="text" name="" class="sign_up_input sign_up_id_input" placeholder="请输入身份证号" id="person_idcard"/>
            </div>
            <div class="sign_up_item">
                <label><span>*</span>本人电话</label>
                <input type="text" name="" class="sign_up_input required" placeholder="请填写" id="person_phone" tip="本人电话"/>
            </div>
            <div class="sign_up_item">
                <label><span>*</span>性别</label>
                <em class="sign_up_tab sign_up_tab_on" val="1" tag_id="sex_seleced">男</em>
                <em  class="sign_up_tab"  val="2" tag_id="sex_seleced">女</em>
            </div>
            <input type="hidden" name="" value="1" class="required" id="sex_seleced" tip="性别">
            <div class="sign_up_item">
                <label><span>&nbsp;</span>推荐单位</label>
                <input type="text" name="" class="sign_up_input" placeholder="政府机构，街道办事处等" id="person_recommand"/>
            </div>
            <div class="sign_up_item">
                <label><span>*</span>家庭住址</label>
                <input type="text" name="" class="sign_up_input required" placeholder="请填写" id="person_address" tip="家庭住址"/>
            </div>
            <div class="sign_up_item">
                <label><span>*</span>紧急联系人</label>
                <input type="text" name="" class="sign_up_input required" placeholder="请填写" id="person_emg_contact" tip="紧急联系人"/>
            </div>
            <div class="sign_up_item">
                <label><span>*</span>紧急联系人电话</label>
                <input type="text" name="" class="sign_up_input required" placeholder="请填写" id="person_emg_phone" tip="紧急联系人电话"/>
            </div>
            <div class="sign_up_radio">
                <input type="radio" class="radio" id="person_radio" value="1"><span>我阅读并同意</span><em>《参演协议》</em>
            </div>
            <div class="form_submit" >
                <div class="form_submit_text"  id="form_btn1">
                    <span>神农杯--燕赵文化银龄展演</span>
                    <em>提交</em>
                </div>
            </div>
        </form>
        <form id="form_2" style="display: none;">
            <div class="sign_up_item">
                <label><span>*</span>参赛场次</label>
                <div class="sign_up_select"  val="team_compete_id" text="compete_tuanti" id="compete_tuanti" >请选择参数场次</div>
            </div>
            <input type="hidden" name="" value="" class="required" id="team_compete_id" tip="参数场次">
            <div class="sign_up_item">
                <label><span>*</span>团队名称</label>
                <input type="text" name="" class="sign_up_input required" placeholder="请填写" id="team_name" tip="团队名称"/>
            </div>
            <div class="sign_up_item">
                <label><span>*</span>表演人数</label>
                <input type="text" name="" class="sign_up_input" placeholder="请填写2-99" id="team_peoples"/>
            </div>
            <div class="sign_up_item">
                <label><span>*</span>节目名字</label>
                <input type="text" name="" class="sign_up_input required" placeholder="请填写" id="team_subject" tip="节目名称"/>
            </div>
            <div class="sign_up_item">
                <label><span>*</span>本人身份</label>
                <em class="sign_up_tab sign_up_tab_on" val="1" tag_id="id_seleced">领队</em>
                <em  class="sign_up_tab" val="2" tag_id="id_seleced">队员</em>
            </div>
            <input type="hidden" name="" value="1" id="id_seleced">
            <div class="sign_up_item">
                <label><span>*</span>本人姓名</label>
                <input type="text" name="" class="sign_up_input required" placeholder="请填写" id="team_person_name" tip="本人姓名"/>
            </div>
            <div class="sign_up_item">
                <label><span>*</span>本人电话</label>
                <input type="text" name="" class="sign_up_input required" placeholder="请填写" id="team_person_phone" tip="本人电话"/>
            </div>
            <div class="sign_up_item">
                <label class="sign_up_id"><span>&nbsp;</span>身份证号码（50周以上）</label>
                <input type="text" name="" class="sign_up_input sign_up_id_input" placeholder="请输入身份证号" id="team_person_idcard"/>
            </div>

            <div class="sign_up_item">
                <label><span>*</span>性别</label>
                <em class="sign_up_tab sign_up_tab_on" val="1" tag_id="team_sex_seleced">男</em>
                <em  class="sign_up_tab"  val="2" tag_id="team_sex_seleced">女</em>
            </div>
            <input type="hidden" name="" value="1" class="required" id="team_sex_seleced" tip="性别">
            <div class="sign_up_item">
                <label><span>&nbsp;</span>推荐单位</label>
                <input type="text" name="" class="sign_up_input" placeholder="政府机构，街道办事处等" id="team_recommand"/>
            </div>
            <div class="sign_up_item">
                <label><span>*</span>家庭住址</label>
                <input type="text" name="" class="sign_up_input required" placeholder="请填写" id="team_person_address" tip="家庭住址"/>
            </div>
            <div class="sign_up_item">
                <label><span>*</span>紧急联系人</label>
                <input type="text" name="" class="sign_up_input required" placeholder="请填写" id="team_person_emg_contact" tip="紧急联系人"/>
            </div>
            <div class="sign_up_item">
                <label><span>*</span>紧急联系人电话</label>
                <input type="text" name="" class="sign_up_input required" placeholder="请填写" id="team_person_emg_phone" tip="紧急联系人电话"/>
            </div>
            <div class="sign_up_radio">
                <input type="radio" class="radio" id="team_radio" value="1"><span>我阅读并同意</span><em>《参演协议》</em>
            </div>
            <div class="form_submit">
                <div class="form_submit_text" id="form_btn2">
                    <span>神农杯--燕赵文化银龄展演</span>
                    <em>提交</em>
                </div>
            </div>
        </form>

    </div>
    <!--show_xieyi-->
    <div class="show_box" id="show_xieyi">
        <div class="show_div">
            <h1>《参演协议》</h1>
            <span class="gb"></span>
            <div class="show_div_p">
                <div>参演协议</div>
            </div>
        </div>
    </div>

    <!--show_box-->
    <input id="for_seleced_id" value="" type="hidden"/>
    <input id="for_seleced_text" value="" type="hidden"/>
    <div class="show_box" id="show_box">
        <div class="show_div">
            <h1>请选择参赛场次</h1>
            <span class="gb"></span>
            <h2><span>请选择</span></h2>
            <ul class="show_div_ul">
                <li class="on" val="1">2025年6月28-29日 预选赛第一场</li>
                <li val="2">2025年7月5-6日 预选赛第二场</li>
                <li val="3">2025年7月12-13日 预选赛第三场</li>
                <li val="4">2025年7月19-20日 预选赛第四场</li>
                <li val="5">2025年7月26-27日 预选赛第五场</li>
                <li val="6">2025年8月2-3日 预选赛第六场</li>
                <li val="7">2025年8月9-10日 预选赛第七场</li>
                <li val="8">2025年8月16-17日 预选赛第八场</li>
                <li val="9">2025年8月23-24日 预选赛第九场</li>
                <li val="10">2025年8月30-31日 预选赛第十场</li>
            </ul>
        </div>
    </div>

    <script type="text/javascript">
        $(function() {
            // body...
            $("#sign_up_tab .sign_up_tab").bind("click",function(){
                rel = $(this).attr('rel');
                $(this).addClass("sign_up_tab_on").siblings('.sign_up_tab_on').removeClass("sign_up_tab_on");
                $("#form_"+rel).show().siblings('form').hide();
            });

            $(".sign_up_item .sign_up_tab").bind("click",function(){

                val = $(this).attr('val');
                tag = $(this).attr('tag_id');
                $("#"+tag).val(val);
                $(this).addClass("sign_up_tab_on").siblings('.sign_up_tab_on').removeClass("sign_up_tab_on");
            });


            $(".sign_up_select").bind("click",function(){
                val =  $(this).attr('val');
                text =  $(this).attr('text');

                $("#for_seleced_id").val(val);
                $("#for_seleced_text").val(text);
                $("#show_box").show();

            });
            $("#show_box .gb").bind("click",function(){
                $("#show_box").hide();
            });
            $(".sign_up_radio em").bind("click",function(){
                $("#show_xieyi").show();
            });

            $("#show_xieyi .gb").bind("click",function(){
                $("#show_xieyi").hide();
            });
            //参赛选择
            $(".show_div_ul li").bind("click",function(){
                $(this).addClass("on").siblings('li').removeClass("on");
                text = $(this).text();
                val = $(this).attr('val');
                $("#for_seleced_id").val();
                $("#for_seleced_text").val();
                $("#"+$("#for_seleced_text").val()).text(text);
                $("#"+$("#for_seleced_id").val()).val(val);
                $("#show_box").hide();
            });
            //
            $("#form_btn1").bind("click",function(){
                if (!($('#person_radio').is(':checked'))) {
                    layer.msg("请先同意参演协议"); // 可以更具体地指出哪个字段未填写
                    return false;
                }
                var valid = true; // 假设表单有效，直到找到无效的字段
                $('#form_1 .required').each(function() {
                    if ($(this).val().trim() === '') { // 检查是否为空字符串
                        valid = false; // 发现空字段，表单无效
                        layer.msg($(this).attr("tip") + "是必填字段!!!"); // 可以更具体地指出哪个字段未填写
                        console.log($(this).attr("tip"));
                        return false; // 退出each循环
                    }
                });
                if (!valid) {
                    event.preventDefault(); // 如果表单无效，阻止提交
                    return false;
                }

                //提交数据
                var data = {};
                data['type'] = $("#type").val();
                data['sessionId'] = $("#compete_id").val();
                data['progName'] = $("#person_subject").val();
                data['realName'] = $("#person_name").val();
                data['idcard'] = $("#person_idcard").val();
                data['phone'] = $("#person_phone").val();
                data['sex'] = $("#sex_seleced").val();
                data['persons'] = 1;
                data['recommandComp'] = $("#person_recommand").val();
                data['address'] = $("#person_address").val();
                data['emgContact'] = $("#person_emg_contact").val();
                data['emgPhone'] = $("#person_emg_phone").val();
                postData(data);
            });
            //
            $("#form_btn2").bind("click",function(){
                if (!($('#team_radio').is(':checked'))) {
                    layer.msg("请先同意参演协议"); // 可以更具体地指出哪个字段未填写
                    return false;
                }
                var valid = true; // 假设表单有效，直到找到无效的字段
                $('#form_2 .required').each(function() {
                    if ($(this).val().trim() === '') { // 检查是否为空字符串
                        valid = false; // 发现空字段，表单无效
                        layer.msg($(this).attr("tip") + "是必填字段!!!"); // 可以更具体地指出哪个字段未填写
                        console.log($(this).attr("tip"));
                        return false; // 退出each循环
                    }
                });
                if (!valid) {
                    event.preventDefault(); // 如果表单无效，阻止提交
                    return false;
                }

                //提交数据
                var data = {};
                data['type'] = $("#type").val();
                data['sessionId'] = $("#team_compete_id").val();
                data['teamName'] = $("#team_name").val();
                data['peoples'] = $("#team_peoples").val();
                data['progName'] = $("#team_subject").val();
                data['teamIdype'] = $("#id_seleced").val();
                data['realName'] = $("#team_person_name").val();
                data['phone'] = $("#team_person_phone").val();
                data['icard'] = $("#team_person_idcard").val();
                data['sex'] = $("#team_sex_seleced").val();
                data['recommandComp'] = $("#team_recommand").val();
                data['address'] = $("#team_person_address").val();
                data['emgContact'] = $("#team_person_emg_contact").val();
                data['emgPhone'] = $("#team_person_emg_phone").val();
                postData(data);
            });
        });

        function postData(data){
            $.post("/activity/create", data, function(data){
               if(data.succ == 1){
                   window.location.href="/pay/confirm?signUpId=" + data.dataId;
               }else{
                   layer.msg(data.msg);
               }
            });
        }
    </script>
</body>
</html>
